﻿<dx:DXWindow xmlns:dxre="clr-namespace:DevExpress.Xpf.RichEdit;assembly=DevExpress.Xpf.RichEdit.v11.1"  x:Class="BHYT.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:BHYT"
		xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
		xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
		xmlns:dxbh="http://schemas.devexpress.com/winfx/2008/xaml/bars/internal"
		xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
		xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
		xmlns:dxd="http://schemas.devexpress.com/winfx/2008/xaml/docking"
		xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:uc="clr-namespace:BHYT.UC"
		xmlns:collections="clr-namespace:System.Collections;assembly=mscorlib"
        Title="DXWpfApplication" Height="590" Width="790"
        dx:ThemeManager.ThemeName="DeepBlue" WindowState="Maximized"
    >
    <dx:DXWindow.Resources>
        <ResourceDictionary>
            <dxre:RichEditUICommand x:Key="commands" />
            <dxre:RichEditStringIdConverter x:Key="stringIdConverter" />
        </ResourceDictionary>
    </dx:DXWindow.Resources>
    <dxb:BarManager dxbh:BlendHelperForBarsAndRibbon.IsDesignControl="true" Name="barManager1">
        <dxb:BarManager.Items>
            <dxb:BarEditItem Name="eEditItem" EditWidth="74" Content="Edit Item:">
                <dxb:BarEditItem.EditSettings>
                    <dxe:TextEditSettings />
                </dxb:BarEditItem.EditSettings>
            </dxb:BarEditItem>
            <dxb:BarCheckItem Name="eCheckItem" Content="Check item" />
            <dxb:BarStaticItem Name="eStaticItem" Content="Static item" />
            <dxb:BarButtonItem x:Name="bHelp" Content="Help" Glyph="Images/Icons/index-16x16.png" LargeGlyph="Images/Icons/index-32x32.png" />
            <dxb:BarButtonItem x:Name="bCut"  Content="Cut"  Glyph="Images/Icons/cut-16x16.png"   LargeGlyph="Images/Icons/cut-32x32.png" />
            <dxb:BarButtonItem x:Name="bCopy" Content="Copy" Glyph="Images/Icons/copy-16x16.png" LargeGlyph="Images/Icons/copy-32x32.png" />
            <dxb:BarButtonItem x:Name="bPaste" Content="Paste" Glyph="Images/Icons/paste-16x16.png" LargeGlyph="Images/Icons/paste-32x32.png" />
            <dxb:BarButtonItem x:Name="bNew" Content="New" Glyph="Images/Icons/new-16x16.png" LargeGlyph="Images/Icons/New-32x32.png" />
            <dxb:BarButtonItem x:Name="bPrint" Content="Print" Glyph="Images/Icons/print-16x16.png" LargeGlyph="Images/Icons/print-32x32.png" />
            <dxb:BarButtonItem x:Name="bOpen" Content="Open" Glyph="Images/Icons/open-16x16.png" LargeGlyph="Images/Icons/open-32x32.png" />
            <dxb:BarSplitButtonItem x:Name="bSplitButton" Content="open" Glyph="Images/Icons/open-16x16.png" LargeGlyph="Images/Icons/open-32x32.png" />
            <!--<dxb:BarSubItem x:Name="mmFile" Content="File" Glyph="Images/Icons/zoom-16x16.png" LargeGlyph="Images/Icons/zoom-32x32.png">
                <dxb:BarSubItem.ItemLinks>
                    <dxb:BarButtonItemLink BarItemName="bNew" />
                    <dxb:BarButtonItemLink BarItemName="bOpen" />
                </dxb:BarSubItem.ItemLinks>
            </dxb:BarSubItem>-->
            <dxr:BarButtonGroup x:Name="bgButtons1">
                <dxr:BarButtonGroup.ItemLinks></dxr:BarButtonGroup.ItemLinks>
            </dxr:BarButtonGroup>
            <dxr:BarButtonGroup x:Name="bgButtons2">
                <dxr:BarButtonGroup.ItemLinks>
                    <dxb:BarButtonItemLink BarItemName="bCopy" />
                    <dxb:BarButtonItemLink BarItemName="bCut" />
                    <dxb:BarButtonItemLink BarItemName="bPaste" />
                </dxr:BarButtonGroup.ItemLinks>
            </dxr:BarButtonGroup>
            <dxr:BarButtonGroup x:Name="bgItems1">
                <dxr:BarButtonGroup.ItemLinks>
                    <dxb:BarCheckItemLink BarItemName="eCheckItem" />
                </dxr:BarButtonGroup.ItemLinks>
            </dxr:BarButtonGroup>
            <dxr:BarButtonGroup x:Name="bgItems2">
                <dxr:BarButtonGroup.ItemLinks>
                    <dxb:BarEditItemLink BarItemName="eEditItem" />
                </dxr:BarButtonGroup.ItemLinks>
            </dxr:BarButtonGroup>
            <dxr:RibbonGalleryBarItem Name="itemGallery" DropDownGalleryMenuItemsGlyphSize="Small">
                <dxr:RibbonGalleryBarItem.DropDownMenuItemLinks>
                    <dxb:BarEditItemLink BarItemName="eEditItem" />
                    <dxb:BarEditItemLink BarItemName="eEditItem" />
                </dxr:RibbonGalleryBarItem.DropDownMenuItemLinks>
                <dxr:RibbonGalleryBarItem.Gallery>
                    <dxb:Gallery ColCount="6" MinColCount="3" RowCount="3" ItemGlyphMargin="1" ItemCaptionMargin="1" ItemGlyphLocation="Right" ItemGlyphHorizontalAlignment="Right" ItemGlyphVerticalAlignment="Bottom" FilterCaption="Gallery control" AllowFilter="True" AllowHoverImages="True" IsItemCaptionVisible="False" IsItemDescriptionVisible="False" IsGroupCaptionVisible="False" SizeMode="Both" ItemCheckMode="Single" dxbh:BlendHelperForBarsAndRibbon.IsDesignControl="True">
                        <dxb:Gallery.Groups>
                            <dxb:GalleryItemGroup Name="Group11" Caption="Group 1">
                                <dxb:GalleryItemGroup.Items>
                                    <dxb:GalleryItem Glyph="Images/Icons/open-16x16.png" Caption="Item 1" Description="Set font" HoverGlyph="Images/Icons/open-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/zoom-16x16.png" Caption="Item 2" Description="Create a new file" HoverGlyph="Images/Icons/zoom-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/print-16x16.png" Caption="Font size decrease" Description="Decrease the font size." HoverGlyph="Images/Icons/print-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/paste-16x16.png" Caption="Font size increase" HoverGlyph="Images/Icons/paste-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/copy-16x16.png" Caption="Hidden text" HoverGlyph="Images/Icons/copy-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/new-16x16.png" Caption="Highlight" HoverGlyph="Images/Icons/new-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/print-16x16.png" Caption="Font size decrease" Description="Decrease the font size." HoverGlyph="Images/Icons/print-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/paste-16x16.png" Caption="Font size increase" HoverGlyph="Images/Icons/paste-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/copy-16x16.png" Caption="Hidden text" HoverGlyph="Images/Icons/copy-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/new-16x16.png" Caption="Highlight" HoverGlyph="Images/Icons/new-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/print-16x16.png" Caption="Font size decrease" Description="Decrease the font size." HoverGlyph="Images/Icons/print-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/paste-16x16.png" Caption="Font size increase" HoverGlyph="Images/Icons/paste-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/copy-16x16.png" Caption="Hidden text" HoverGlyph="Images/Icons/copy-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/new-16x16.png" Caption="Highlight" HoverGlyph="Images/Icons/new-32x32.png" />
                                </dxb:GalleryItemGroup.Items>
                            </dxb:GalleryItemGroup>
                            <dxb:GalleryItemGroup Name="Group12" Caption="Group 2">
                                <dxb:GalleryItemGroup.Items>
                                    <dxb:GalleryItem Glyph="Images/Icons/print-16x16.png" Caption="Font size decrease" Description="Decrease the font size." HoverGlyph="Images/Icons/print-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/paste-16x16.png" Caption="Font size increase" HoverGlyph="Images/Icons/paste-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/copy-16x16.png" Caption="Hidden text" HoverGlyph="Images/Icons/copy-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/new-16x16.png" Caption="Highlight" HoverGlyph="Images/Icons/new-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/print-16x16.png" Caption="Font size decrease" Description="Decrease the font size." HoverGlyph="Images/Icons/print-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/paste-16x16.png" Caption="Font size increase" HoverGlyph="Images/Icons/paste-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/copy-16x16.png" Caption="Hidden text" HoverGlyph="Images/Icons/copy-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/new-16x16.png" Caption="Highlight" HoverGlyph="Images/Icons/new-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/print-16x16.png" Caption="Font size decrease" Description="Decrease the font size." HoverGlyph="Images/Icons/print-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/paste-16x16.png" Caption="Font size increase" HoverGlyph="Images/Icons/paste-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/copy-16x16.png" Caption="Hidden text" HoverGlyph="Images/Icons/copy-32x32.png" />
                                    <dxb:GalleryItem Glyph="Images/Icons/new-16x16.png" Caption="Highlight" HoverGlyph="Images/Icons/new-32x32.png" />
                                </dxb:GalleryItemGroup.Items>
                            </dxb:GalleryItemGroup>
                        </dxb:Gallery.Groups>
                    </dxb:Gallery>
                </dxr:RibbonGalleryBarItem.Gallery>
            </dxr:RibbonGalleryBarItem>
            <dxb:BarButtonItem Command="{Binding Path=FileNew, Mode=OneTime, Source={StaticResource commands}}" Name="biFileNew" />
            <dxb:BarButtonItem Command="{Binding Path=FileOpen, Mode=OneTime, Source={StaticResource commands}}" Name="biFileOpen" />
            <dxb:BarButtonItem Command="{Binding Path=FileSave, Mode=OneTime, Source={StaticResource commands}}" Name="biFileSave" />
            <dxb:BarButtonItem Command="{Binding Path=FileSaveAs, Mode=OneTime, Source={StaticResource commands}}" Name="biFileSaveAs" />
            <dxb:BarButtonItem Command="{Binding Path=FileQuickPrint, Mode=OneTime, Source={StaticResource commands}}" Name="biFileQuickPrint" />
            <dxb:BarButtonItem Command="{Binding Path=FilePrint, Mode=OneTime, Source={StaticResource commands}}" Name="biFilePrint" />
            <dxb:BarButtonItem Command="{Binding Path=EditUndo, Mode=OneTime, Source={StaticResource commands}}" Name="biEditUndo" />
            <dxb:BarButtonItem Command="{Binding Path=EditRedo, Mode=OneTime, Source={StaticResource commands}}" Name="biEditRedo" />
        </dxb:BarManager.Items>
        <DockPanel>
            <dxr:RibbonControl x:Name="ribbonControl1" RibbonStyle="Office2010" dxbh:BlendHelperForBarsAndRibbon.IsDesignControl="true" DockPanel.Dock="Top">
                <dxr:RibbonControl.ApplicationMenu>
                    <dxr:ApplicationMenuInfo RightPaneWidth="280" ShowRightPane="True">
                        <dxr:ApplicationMenuInfo.ItemLinks>
                            <dxb:BarButtonItemLink BarItemName="bNew" />
                            <dxb:BarButtonItemLink BarItemName="bOpen" />
                            <dxb:BarButtonItemLink BarItemName="bHelp" />
                        </dxr:ApplicationMenuInfo.ItemLinks>
                        <dxr:ApplicationMenuInfo.RightPane>
                            <Button Content="Right Pane" />
                        </dxr:ApplicationMenuInfo.RightPane>
                        <dxr:ApplicationMenuInfo.BottomPane>
                            <StackPanel Orientation="Horizontal">
                                <Button Content="OK button" />
                            </StackPanel>
                        </dxr:ApplicationMenuInfo.BottomPane>
                    </dxr:ApplicationMenuInfo>
                </dxr:RibbonControl.ApplicationMenu>
                <dxr:RibbonControl.PageHeaderItemLinks>
                    <dxb:BarButtonItemLink BarItemName="bNew" />
                    <dxb:BarButtonItemLink BarItemName="bOpen" />
                    <dxb:BarButtonItemLink BarItemName="bHelp" />
                </dxr:RibbonControl.PageHeaderItemLinks>
                <dxr:RibbonDefaultPageCategory>
                    <dxr:RibbonPage Name="Home" Caption="Home">
                        <dxr:RibbonPageGroup Caption="Buttons">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="bNew" />
                                <!--<dxb:BarSubItemLink BarItemName="mmFile" RibbonStyle="Large" />-->
                                <dxb:BarButtonItemLink BarItemName="bOpen" RibbonStyle="SmallWithText" />
                                <!--<dxb:BarSubItemLink BarItemName="mmFile" RibbonStyle="SmallWithText" />-->
                                <dxb:BarButtonItemLink BarItemName="bPrint" RibbonStyle="SmallWithText" />
                                <dxb:BarItemLinkSeparator />
                                <dxb:BarButtonItemLink BarItemName="bOpen" RibbonStyle="SmallWithoutText" />
                                <!--<dxb:BarSubItemLink BarItemName="mmFile" RibbonStyle="SmallWithoutText" />-->
                                <dxb:BarButtonItemLink BarItemName="bPrint" RibbonStyle="SmallWithoutText" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Button groups">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxr:BarButtonGroupLink BarItemName="bgButtons1" />
                                <dxr:BarButtonGroupLink BarItemName="bgButtons2" />
                                <dxr:BarButtonGroupLink BarItemName="bgItems1" />
                                <dxr:BarButtonGroupLink BarItemName="bgItems2" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Gallery">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarItemLink BarItemName="itemGallery" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Name="Second" Caption="Second Page">
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Name="Third" Caption="Third Page">
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Name="Forth" Caption="Forth Page">
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Name="Fifth" Caption="Fifth Page">
                    </dxr:RibbonPage>
                </dxr:RibbonDefaultPageCategory>
                <dxr:RibbonControl.ToolbarItemLinks>
                    <dxb:BarButtonItemLink BarItemName="bNew" />
                    <dxb:BarButtonItemLink BarItemName="bOpen" />
                    <dxb:BarItemLinkSeparator />
                    <dxb:BarButtonItemLink BarItemName="bCopy" />
                    <dxb:BarButtonItemLink BarItemName="bPaste" />
                </dxr:RibbonControl.ToolbarItemLinks>
            </dxr:RibbonControl>
            <!--<dxr:RibbonStatusBarControl dxbh:BlendHelperForBarsAndRibbon.IsDesignControl="true" DockPanel.Dock="Bottom">
                <dxr:RibbonStatusBarControl.LeftItemLinks>
                    <dxb:BarEditItemLink BarItemName="eEditItem" />
                    <dxb:BarCheckItemLink BarItemName="eCheckItem" />
                    <dxb:BarStaticItemLink BarItemName="eStaticItem" />
                    <dxb:BarButtonItemLink BarItemName="bCut" />
                </dxr:RibbonStatusBarControl.LeftItemLinks>
                <dxr:RibbonStatusBarControl.RightItemLinks>
                    <dxb:BarEditItemLink BarItemName="eEditItem" />
                    <dxb:BarCheckItemLink BarItemName="eCheckItem" />
                    <dxb:BarStaticItemLink BarItemName="eStaticItem" />
                    <dxb:BarButtonItemLink BarItemName="bCut" />
                </dxr:RibbonStatusBarControl.RightItemLinks>
            </dxr:RibbonStatusBarControl>-->
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="300"/>
                    <ColumnDefinition Width="200*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="100*"/>
                </Grid.RowDefinitions>
                <Grid Grid.RowSpan="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="28"/>
                        <RowDefinition Height="300*"/>
                    </Grid.RowDefinitions>
                    <dxe:ButtonEdit Name="btnDuongDan" DefaultButtonClick="btnDuongDan_DefaultButtonClick" IsReadOnly="True" Margin="2,2" />
                    <dxg:GridControl Name="gridFileGui" Grid.Row="1">
                        <dxg:GridControl.Columns>
                            <dxg:GridColumn Header="Tên File" FieldName="TenFile" AllowEditing="False"/>
                            <dxg:GridColumn Header="Tên DV" FieldName="TenDonVi" AllowEditing="False"/>
                            <dxg:GridColumn Header="Email" FieldName="Email" AllowEditing="False"/>
                        </dxg:GridControl.Columns>
                        <dxg:GridControl.View>
                            <dxg:TableView ShowAutoFilterRow="True" NavigationStyle="Cell"
                                           ShowGroupedColumns="False" ShowColumnHeaders="True" 
                                           ShowGroupPanel="False" AutoWidth="True"
                                           AllowDrop="False" AllowGrouping="False" AllowMoveColumnToDropArea="False" 
                                           AllowMoving="False" IsColumnMenuEnabled="False" IsDeferredScrolling="False" 
                                           IsGroupPanelMenuEnabled="False" IsRowCellMenuEnabled="True"
                                           IsTotalSummaryMenuEnabled="False" MultiSelectMode="None">
                            </dxg:TableView>
                        </dxg:GridControl.View>
                    </dxg:GridControl>
                </Grid>
                <dxd:DockLayoutManager x:Name="dockManager2" Grid.Column="1">
                    <dxd:LayoutGroup>
                        <dxd:LayoutGroup>
                            <dxd:LayoutGroup GroupBorderStyle="Group">
                                <dxd:LayoutGroup>
                                    <dxd:LayoutControlItem>
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="28"/>
                                                <RowDefinition Height="28"/>
                                                <RowDefinition Height="28"/>
                                                <RowDefinition Height="100*"/>
                                                <RowDefinition Height="34"/>
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="60"/>
                                                <ColumnDefinition Width="100*"/>
                                                <ColumnDefinition Width="18"/>
                                            </Grid.ColumnDefinitions>
                                            <Label Content="From:" VerticalAlignment="Center" FontSize="14"/>
                                            <dxe:TextEdit Name="txtFrom" Grid.Column="1" Margin="2,2" IsReadOnly="True"/>
                                            <Label Content="To:" Grid.Row="1" VerticalAlignment="Center" FontSize="14" />
                                            <dxe:TextEdit Name="txtTo" Grid.Row="1" Grid.Column="1" Margin="2,2" IsReadOnly="True"/>
                                            <Label Content="Subject:" Grid.Row="2" VerticalAlignment="Center" FontSize="14"/>
                                            <dxe:TextEdit Name="txtSubject" Grid.Row="2" Grid.Column="1" Margin="2,2"/>
                                            <uc:ucRichEditor x:Name="ucRichEdit" Grid.Row="3" Grid.ColumnSpan="2"/>

                                            <Grid Grid.Row="5" Grid.ColumnSpan="2">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="4" />
                                                    <RowDefinition Height="26" />
                                                    <RowDefinition Height="4" />
                                                </Grid.RowDefinitions>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="75" />
                                                    <ColumnDefinition Width="5" />
                                                    <ColumnDefinition Width="100" />
                                                    <ColumnDefinition Width="5" />
                                                    <ColumnDefinition Width="100*" />
                                                    <ColumnDefinition Width="75" />
                                                </Grid.ColumnDefinitions>
                                                <Button Name="btnGuiMail" Content="Gửi mail" Grid.Row="1" Click="btnGuiMail_Click"/>
                                                <Button Name="btnXoaNoiDung" Grid.Row="1" Content="Xóa nội dung" Grid.Column="2"
                                                        Click="btnXoaNoiDung_Click"/>
                                                <Button Name="btnDong" Click="btnDong_Click" Content="Đóng" Grid.Column="5" Grid.Row="1"/>
                                            </Grid>

                                        </Grid>
                                    </dxd:LayoutControlItem>
                                </dxd:LayoutGroup>
                            </dxd:LayoutGroup>
                        </dxd:LayoutGroup>
                    </dxd:LayoutGroup>
                </dxd:DockLayoutManager>
                
            </Grid>
        </DockPanel>
    </dxb:BarManager>
</dx:DXWindow>